Skip to content

chore(deps)!: fix Trivy security findings - #45

Merged
appleboy merged 1 commit into
masterfrom
chore/fix-trivy-security-dependencies
Sep 21, 2026
Merged

appleboy merged 1 commit into
masterfrom
chore/fix-trivy-security-dependencies

Conversation

@appleboy

Copy link
Copy Markdown
Member

Summary

Trivy fails on CVE-2026-56855 and CVE-2026-78662 in golang.org/x/crypto v0.55.0. Upgrade every affected module to v0.56.0 and refresh module checksums.

Compatibility change: the new x/crypto release requires Go 1.26. Affected modules now declare go 1.26.0; applicable CI settings and documented minimum versions are aligned. Application source and scanner severity settings are unchanged.

Goal and scope: fix the dependency vulnerabilities reported by Trivy in this repository, including nested example modules. No related issue was supplied.

Verification

Setup

Check out chore/fix-trivy-security-dependencies and start in the repository root. Use Go 1.26+ (tested with Go 1.26.7 and GOTOOLCHAIN=local) and Trivy (tested with 0.69.3 and a freshly downloaded database on 2026-09-20). Use a clean checkout without stale locally compiled binaries.

Automated checks

Run the test command from each directory listed below (paths are relative to the repository root). Exit 0 means the module compiles and all available tests pass.

Directory Command Observed result
. go test -mod=readonly -p 2 -timeout 90s ./... Passed (exit 0)

From the repository root:

trivy fs --scanners vuln,secret,misconfig --severity CRITICAL,HIGH,MEDIUM --ignore-unfixed --exit-code 1 --skip-dirs .claude --skip-dirs .git --skip-dirs node_modules .
git diff --check
  • Passed: Trivy exited 0 with no findings at the configured severity/fixability threshold. Local validation additionally excluded existing untracked files (old binaries); those files are not part of this PR.
  • Passed: working-tree whitespace check.
  • Not run locally: the full GitHub Actions workflow set, including configured lint/platform/Go-version jobs. Local tests used macOS arm64 / Go 1.26.7.

Security regression check

  1. From the same clean PR checkout, run the Trivy command above. Expected: exit 0, with neither SSH CVE reported. Observed: Passed.
  2. In each updated module directory, run go list -m golang.org/x/crypto. Expected: golang.org/x/crypto v0.56.0. Observed: dependency version verified in every updated manifest.

No production data or credentials are used. Go/Trivy populate local caches; no application cleanup is needed.

AI authorship

  • AI was used: OpenAI Codex.
  • AI-authored files: go.mod, go.sum.
  • Human line-by-line reviewed: None — not yet reviewed by a human.

Change classification and review

Core: shared security dependencies and a minimum toolchain change. Request two reviewers including the module owner. Review the Go minimum, dependency versions and CI settings; spot-check generated checksums. No application permission, auth-flow or external-interface logic was modified. No secrets or unrelated local files are included.

Risk and rollback

Go 1.25 users must upgrade to Go 1.26+. Existing APIs are unchanged, but dependency behavior and runtime compatibility need CI review. Revert this commit to restore the prior dependency/toolchain requirements; doing so restores the reported vulnerabilities.

References

- Upgrade x/crypto to v0.56.0 to fix two SSH denial-of-service vulnerabilities
- Require Go 1.26 across affected modules

BREAKING CHANGE: Go 1.26 or newer is now required by x/crypto v0.56.0. Upgrade the Go toolchain before building.
Copilot AI lite review requested due to automatic review settings September 20, 2026 13:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@appleboy
appleboy merged commit 7ca016c into master Sep 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants